package com.gba.mark.exam.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gba.mark.exam.entity.ExamPaper;
import com.gba.mark.exam.entity.ExamQuestions;
import org.apache.ibatis.annotations.*;
import springfox.documentation.spring.web.json.Json;

import java.util.List;

@Mapper
public interface ExamQuestionsMapper extends BaseMapper<ExamQuestions> {

/*
查询题目
 */


@Select(
        "SELECT eq.questions FROM exam_questions eq,\n" +
        "exam_paper ep WHERE group_id = #{group_id}\n" +
        " AND question_ids = ep.id")

@Results({

        @Result(property = "id",column = "id"),
        @Result(property = "questions",column = "questions"),
        @Result(property = "answer",column = "answer"),

})
    List<ExamQuestions> findQuestion(

            @Param("question") String questions,
            @Param("group_id") Integer group_id,
            @Param("question_ids") Object question_ids);


}
